import { useSystemInfo, piniaInstance } from '@/store'
import { computed } from 'vue'
const systeInfo = useSystemInfo(piniaInstance)
export const useAuth = (p: string | string[]) => {
    return computed(() => {
        if (systeInfo.userInfo?.adminType === 1) return true
        return Array.isArray(p) ? p.every(i => systeInfo.PowerButtons.has(i)) : systeInfo.PowerButtons.has(p)
    })
}
